Media validation

ABSTRACT

A banknote validator which classes media items into three or more classes is described. Information from all of a set of training images from genuine media items is used to form one or more segmentation maps which are then used to segment each of the training set images. Features are extracted from the segments and used to form one or more classifiers. Classifiers can be quickly and simply formed for media items such as different currencies and denominations of banknotes in this way and without the need for examples of counterfeit banknotes. In some examples, the classifier(s) are arranged to operate at a plurality of pre-specified confidence levels. In other examples, a plurality of classifiers are formed from feature information obtained from different segments. In other examples, segmentation maps are associated with different regions of an image of a media item. The media validator may be incorporated in a self-service apparatus such as an automated teller machine.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part application of U.S. patentapplication Ser. No. 11/366,147, filed on Mar. 2, 2006, which is acontinuation-in-part application of U.S. patent application Ser. No.11/305,537, filed on Dec. 16, 2005. Application Ser. No. 11/366,147,filed on Mar. 2, 2006 and application Ser. No. 11/305,537, filed on Dec.16, 2005 are hereby incorporated by reference.

TECHNICAL FIELD

The present invention relates to a method and apparatus for mediavalidation. It is particularly related to, but in now way limited to,validation of media such as banknotes, passports, checks, bonds, sharecertificates and the like.

BACKGROUND

There is a growing need for automatic verification and validation ofbanknotes of different currencies and denominations in a simple,reliable, and cost effective manner. This is required, for example, inself-service apparatus which receives banknotes, such as self-servicekiosks, ticket vending machines, automated teller machines arranged totake deposits, self-service currency exchange machines and the like.

Previously, manual methods of currency validation have involved imageexamination, transmission effects such as watermarks and threadregistration marks, feel and even smell of banknotes. Other knownmethods have relied on semi-overt features requiring semi-manualinterrogation. For example, using magnetic means, ultraviolet sensors,fluorescence, infrared detectors, capacitance, metal strips, imagepatterns and similar. However, by their very nature these methods aremanual or semi-manual and are not suitable for many applications wheremanual intervention is unavailable for long periods of time. Forexample, in self-service apparatus.

There are significant problems to be overcome in order to create anautomatic currency validator. For example, many different types ofcurrency exist with different security features and even substratetypes. Within those different denominations also exist commonly withdifferent levels of security features. There is therefore a need toprovide a generic method of easily and simply performing currencyvalidation for those different currencies and denominations.

Previous automatic validation methods typically require a relativelylarge number of examples of counterfeit banknotes to be known in orderto train the classifier. In addition, those previous classifiers aretrained to detect known counterfeits only. This is problematic becauseoften little or no information is available about possible counterfeits.For example, this is particularly problematic for newly introduceddenominations or newly introduced currency.

In an earlier paper entitled, “Employing optimized combinations ofone-class classifiers for automated currency validation”, published inPattern Recognition 37, (2004) pages 1085-1096, by Chao He, MarkGirolami and Gary Ross (two of whom are inventors of the presentapplication) an automated currency validation method is described(Patent No. EP1484719, US2004247169) for classifying banknotes as eithergenuine or counterfeit. This involves segmenting an image of a wholebanknote into regions using a grid structure. Individual “one-class”classifiers are built for each region and a small subset of the regionspecific classifiers are combined to provide an overall decision. (Theterm, “one-class” is explained in more detail below.) The segmentationand combination of region specific classifiers to achieve goodperformance is achieved by employing a genetic algorithm. This methodrequires a small number of counterfeit samples at the genetic algorithmstage and as such is not suitable when counterfeit data is unavailable.

Previously, currency validation has typically involved classifyingbanknotes as either genuine or counterfeit. However, more recently, aneed has arisen to classify banknotes into more than the two classes ofcounterfeit or genuine. For example, an additional class includeswhether a banknote is “suspect” that is, falls between the genuine andcounterfeit classes. Various regulatory requirements in differentjurisdictions typically specify the classes that are to be used inbanknote validation systems. For example, cash-accepting orcash-recycling automated teller machines or other self-service apparatussuch as vending machines, kiosks and the like.

Classification of a banknote as “suspect” as opposed to genuine orcounterfeit may have financial implications for users of automatedbanknote validating apparatus. In addition, regulatory and commercialrequirements heighten the need to make a distinction between suspectbanknotes and those which are genuine or counterfeit.

There is also a need to perform automatic currency validation in acomputationally inexpensive manner which can be performed in real time.Many of the issues mentioned above also apply to validation of othertypes of media such as passports and cheques.

SUMMARY

A media validator which classes media into three or more classes isdescribed. Information from all of a set of training images from genuinemedia is used to form one or more segmentation maps which are then usedto segment each of the training set images. Features are extracted fromthe segments and used to form one or more classifiers. Classifiers canbe quickly and simply formed for different types of media items such ascurrencies and denominations of banknotes in this way and without theneed for examples of counterfeit media items. In some examples, theclassifier(s) are arranged to operate at a plurality of pre-specifiedconfidence levels. In other examples, a plurality of classifiers areformed from feature information obtained from different segments. Inother examples, segmentation maps are associated with different regionsof an image of a media item. The media validator may be incorporated ina self-service apparatus such as an automated teller machine.

The method may be performed by software in machine readable form on astorage medium. The method steps may be carried out in any suitableorder and/or in parallel as is apparent to the skilled person in theart.

This acknowledges that software can be a valuable, separately tradablecommodity. It is intended to encompass software, which runs on orcontrols “dumb” or standard hardware, to carry out the desiredfunctions, (and therefore the software essentially defines the functionsof the media validator, and can therefore be termed a media validator,even before it is combined with its standard hardware). For similarreasons, it is also intended to encompass software which “describes” ordefines the configuration of hardware, such as HDL (hardware descriptionlanguage) software, as is used for designing silicon chips, or forconfiguring universal programmable chips, to carry out desiredfunctions.

The preferred features may be combined as appropriate, as would beapparent to a skilled person, and may be combined with any of theaspects of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention will be described, by way of example, withreference to the following drawings, in which:

FIG. 1 is a flow diagram of a method of creating a classifier forbanknote validation;

FIG. 2 is a flow diagram of a method of creating a banknote validatorfor classifying banknotes into three or more classes;

FIG. 3 is a flow diagram of a method of classifying banknotes into threeor more classes using a plurality of classifiers, each associated with asegment of a segmentation map;

FIG. 4 is a schematic diagram of using the same classifier withdifferent significance levels to classify banknotes;

FIG. 5 is a flow diagram of a method of classifying banknotes into threeor more classes using the same classifier at each of two significancelevels;

FIG. 6 is a schematic diagram of a banknote divided into regions;

FIG. 7 is a flow diagram of a method of classifying banknotes into threeor more classes using a plurality of classifiers each associated with adifferent region of a banknote;

FIG. 8 is a flow diagram of a method of classifying banknotes into threeor more classes using a combination of localized segmentation maps anddifferent significance levels of classifiers;

FIG. 9 is a flow diagram of a method of classifying banknotes into threeor more classes using a combination of classifiers based on segments anddifferent significance levels of classifiers;

FIG. 10 is a flow diagram of a method of classifying banknotes intothree or more classes using a combination of classifiers based onsegments and banknote regions as well as different significance levelsof classifiers;

FIG. 11 is a schematic diagram of an apparatus for creating a classifierfor banknote validation;

FIG. 12 is a schematic diagram of a banknote validator;

FIG. 13 is a flow diagram of a method of validating a banknote;

FIG. 14 is a schematic diagram of a self-service apparatus with abanknote validator.

DETAILED DESCRIPTION

Embodiments of the present invention are described below by way ofexample only. These examples represent the best ways of putting theinvention into practice that are currently known to the Applicantalthough they are not the only ways in which this could be achieved.

Although the present examples are described and illustrated herein asbeing implemented in a banknote validation system, the system describedherein is provided as an example and not a limitation. As those skilledin the art will appreciate, the present examples are suitable forapplication in a variety of different types of media validation systems,including but not limited to passport validation systems, checkvalidation systems, bond validation systems and share certificatevalidation systems.

The term “one class classifier” is used to refer to a classifier that isformed or built using information about examples only from a singleclass but which is used to allocate newly presented examples either tothat single class or not. This differs from a conventional binaryclassifier which is created using information about examples from twoclasses and which is used to allocate new examples to one or other ofthose two classes. A one-class classifier can be thought of as defininga boundary around a known class such that examples falling out with thatboundary are deemed not to belong to the known class

As mentioned above, a need has arisen to classify banknotes into morethan the two classes of counterfeit or genuine. For example, anadditional class includes whether a banknote is “suspect” that is, fallsbetween the genuine and counterfeit classes. Examples of four categoriesare given in the table below. In this example, a banknote is eitherclassified as not recognized (category 1), as counterfeit (category 2),as genuine (category 4) or as suspect (category 3). CategoryClassification Properties 1 No banknote, not Not detected as a banknotebecause of: recognized Wrong image or format Transportation error (e.g.double feeds, etc.) Large, dog-eared or missing sections Hand-writtennotes, separating cards, etc. - Wrong currency 2 Element(s) identifiedas Image and format recognized, but one or counterfeit moreauthentication features missing or clearly out of tolerance. 3 Elementsnot clearly Image and format recognized, but not all authenticated.Suspect authentication features recognized because banknotes of qualityand/or tolerance deviations. In most cases damaged or soiled banknotes.4 Banknotes authenticated All authentication checks delivered positiveas genuine ones results.

FIG. 1 is a high level flow diagram of a method of creating a classifierfor banknote validation.

First we obtain a training set of images of genuine banknotes (see box10 of FIG. 1). These are images of the same type taken of banknotes ofthe same currency and denomination. The type of image relates to how theimages are obtained, and this may be in any manner known in the art. Forexample, reflection images, transmission images, images on any of a red,blue or green channel, thermal images, infrared images, ultravioletimages, x-ray images or other image types. The images in the trainingset are in registration and are the same size. Pre-processing can becarried out to align the images and scale them to size if necessary, asknown in the art.

We next create a segmentation map using information from the trainingset images (see box 12 of FIG. 1). The segmentation map comprisesinformation about how to divide an image into a plurality of segments.The segments may be non-continuous, that is, a given segment cancomprise more than one patch in different regions of the image.Preferably, but not essentially, the segmentation map also comprises aspecified number of segments to be used.

Using the segmentation map we segment each of the images in the trainingset (see box 14 of FIG. 1). We then extract one or more features fromeach segment in each of the training set images (see box 16 of FIG. 1).By the term “feature” we mean any statistic or other characteristic of asegment. For example, the mean pixel intensity, median pixel intensity,mode of the pixel intensities, texture, histogram, Fourier transformdescriptors, wavelet transform descriptors and/or any other statisticsin a segment.

A classifier is then formed using the feature information (see box 18 ofFIG. 1). Any suitable type of classifier can be used as known in theart. In a particularly preferred embodiment of the invention theclassifier is a one-class classifier and no information aboutcounterfeit banknotes is needed. However, it is also possible to use abinary classifier or other type of classifier of any suitable type asknown in the art. For example, if it is required to classify banknotesinto three or more classes (such as genuine, counterfeit and suspect)then a classifier which classifies into the appropriate number ofclasses may be used.

The method in FIG. 1 enables a classifier for validation of banknotes ofa particular currency and denomination to be formed simply, quickly andeffectively and automatically. To create classifiers for othercurrencies or denominations the method is repeated with appropriatetraining set images.

In a particular example, a one-class classifier is formed which providesclassification into only two classes: genuine or counterfeit. In thissituation it is sometimes required to provide a means whereby additionalclasses are possible, such as the class “suspect” mentioned above. Inorder to enable this we modify the method of FIG. 1 to form more thanone classifier, each classifier being associated with only one segmentfrom the segmentation map (see FIG. 2). This results in two or moreclassifiers (assuming there are two or more segments in the segmentationmap). The outputs of the classifiers are then combined to provide aclassification into more than one class as described below withreference to FIG. 3.

FIG. 2 shows how the method of FIG. 1 is modified to produce more thanone classifier. The method is the same as that of FIG. 1 except that aplurality of classifiers are formed rather than one classifier. Eachclassifier is formed using feature information from a single segment.

shown in FIG. 3 this allows us to classify banknotes into more than twoclasses. A banknote to be classified (or validated) is input to anautomated banknote validator (see box 30). One or more images of thebanknote are captured and pre-processed as described above. Asegmentation map (that has already been formed using any of the methodsdescribed herein or other suitable methods) is then used to segment theimages of the banknote into K segments (see box 32) where K is aninteger value of 2 or more.

Information is extracted from the K segments (see box 33) and input toeach of K classifiers which have already been formed as described hereinor in any other suitable way. If the output from all of the classifiersindicates that the banknote is genuine then an indication is made thatthe banknote is genuine (see box 35). If the output from all theclassifiers indicates that the banknote is counterfeit, then anindication is made that the banknote is counterfeit (see box 36). If oneor more classifiers indicates that the banknote is genuine whilst one ormore of the other classifiers indicates that it is counterfeit, then anindication is made that the banknote is “suspect” (see box 37).

More detail about forming the segmentation map is now given.

Previously in EP1484719 and US2004247169, (as mentioned in thebackground section) we used a segmentation technique that involved usinga grid structure over the image plane and a genetic algorithm method toform the segmentation map. This necessitated using some informationabout counterfeit notes, and incurring computational costs whenperforming the genetic algorithm search.

The present invention uses a different method of forming thesegmentation map which removes the need for using a genetic algorithm orequivalent method to search for a good segmentation map within a largenumber of possible segmentation maps. This reduces computational costand improves performance. In addition the need for information aboutcounterfeit banknotes is removed.

We believe that generally it is difficult in the counterfeiting processto provide a uniform quality of imitation across the whole note andtherefore certain regions of a note are more difficult than others to becopied successfully. We therefore recognized that rather than using arigidly uniform grid segmentation we could improve banknote validationby using a more sophisticated segmentation. Empirical testing that wecarried out indicated that this is indeed the case. Segmentation basedon morphological characteristics such as pattern, color and texture ledto a better performance in detecting counterfeits. However, traditionalimage segmentation methods, such as using edge detectors, when appliedto each image in the training set were difficult to use. This is becausevarying results are obtained for each training set member and it isdifficult to align corresponding features in different training setimages. In order to avoid this problem of aligning segments we used, inone preferred embodiment, a so called “spatio-temporal imagedecomposition”.

Details about the method of forming the segmentation map are now given.At a high level this method can be thought of as specifying how todivide the image plane into a plurality of segments, each comprising aplurality of specified pixels. The segments can be non-continuous asmentioned above. For example, this specification is made on the basis ofinformation from all images in the training set. In contrast,segmentation using a rigid grid structure does not require informationfrom images in the training set.

For example, each segmentation map comprises information aboutrelationships of corresponding image elements between all images in thetraining set.

Consider the images in the training set as being stacked and inregistration with one another in the same orientation. Taking a givenpixel in the note image plane this pixel is thought of as having a“pixel intensity profile” comprising information about the pixelintensity at that particular pixel position in each of the training setimages. Using any suitable clustering algorithm, pixel positions in theimage plane are clustered into segments, where pixel positions in thosesegments have similar or correlated pixel intensity profiles.

In a preferred example we use these pixel intensity profiles. However,it is not essential to use pixel intensity profiles. It is also possibleto use other information from all images in the training set. Forexample, intensity profiles for blocks of 4 neighboring pixels or meanvalues of pixel intensities for pixels at the same location in each ofthe training set images.

A particularly preferred embodiment of our method of forming thesegmentation map is now described in detail. This is based on the methodtaught in the following publication “EigenSegments: A spatio-temporaldecomposition of an ensemble of images” by Avidan, S. Lecture Notes inComputer Science, 2352: 747-758, 2002.

Given an ensemble of images {I_(i)}i=1, 2, . . . , N which have beenregistered and scaled to the same size r×c, each image I_(i) can berepresented by its pixels as [a_(1i), a_(2i), . . . , a_(Mi)]^(T) invector form, where a_(ji)(j=1,2, . . . , M) is the intensity of the jthpixel in the ith image and M=r·c is the total number of pixels in theimage. A design matrix Aε

^(M×N) can then be generated by stacking vectors I_(i) (zeroed using themean value) of all images in the ensemble, thus A=└I₁, I₂, . . . ,I_(N)┘. A row vector └a_(ji), a_(j2), . . . , a_(jN)┘ in A can be seenas an intensity profile for a particular pixel (jth) across N images. Iftwo pixels come from the same pattern region of the image they arelikely to have the similar intensity values and hence have a strongtemporal correlation. Note the term “temporal” here need not exactlycorrespond to the time axis but is borrowed to indicate the axis acrossdifferent images in the ensemble. Our algorithm tries to find thesecorrelations and segments the image plane spatially into regions ofpixels that have similar temporal behavior. We measure this correlationby defining a metric between intensity profiles. A simple way is to usethe Euclidean distance, i.e. the temporal correlation between two pixelsj and k can be denoted as d(j,k)=√{square root over (Σ_(i=1)^(N)(a_(ji)−a_(ki))²)}. The smaller d(j,k), the stronger the correlationbetween the two pixels.

In order to decompose the image plane spatially using the temporalcorrelations between pixels, we run a clustering algorithm on the pixelintensity profiles (the rows of the design matrix A). It will produceclusters of temporally correlated pixels. The most straightforwardchoice is to employ the K-means algorithm, but it could be any otherclustering algorithm. As a result the image plane is segmented intoseveral segments of temporally correlated pixels. This can then be usedas a map to segment all images in the training set; and a classifier canbe built on features extracted from those segments of all images in thetraining set.

In order to achieve the training without utilizing counterfeit notes,one-class classifier is preferable. Any suitable type of one-classclassifier can be used as known in the art. For example, neural networkbased one-class classifiers and statistical based one-class classifiers.

Suitable statistical methods for one-class classification are in generalbased on maximization of the log-likelihood ratio under thenull-hypothesis that the observation under consideration is drawn fromthe target class and these include the D² test (described in Morrison, DF: Multivariate Statistical Methods (third edition). McGraw-HillPublishing Company, New York, 1990) which assumes a multivariateGaussian distribution for the target class (genuine currency). In thecase of an arbitrary non-Gaussian distribution the density of the targetclass can be estimated using for example a semi-parametric Mixture ofGaussians (described in Bishop, C M: Neural Networks for PatternRecognition, Oxford University Press, New York, 1995) or anon-parametric Parzen window (described in Duda, R O, Hart, P E, Stork,D G: Pattern Classification (second edition), John Wiley & Sons, INC,New York, 2001) and the distribution of the log-likelihood ratio underthe null-hypothesis can be obtained by sampling techniques such as thebootstrap (described in Wang, S, Woodward, W A, Gary, H L et al: A newtest for outlier detetion from a multivariate mixture distribution,Journal of Computational and Graphical Statistics, 6(3): 285-299, 1997).

Other methods which can be employed for one-class classification areSupport Vector Data Domain Description (SVDD) (described in Tax, D M J,Duin, R P W: Support vector domain description, Pattern RecognitionLetters, 20(11-12): 1191-1199, 1999), also known as ‘support estimation’(described in Hayton, P, Schölkopf, B, Tarrassenko, L, Anuzis, P:Support Vector Novelty Detection Applied to Jet Engine VibrationSpectra, Advances in Neural Information Processing Systems, 13, edsLeen, Todd K and Dietterich, Thomas G and Tresp, Volker, MIT Press,946-952, 2001) and Extreme Value Theory (EVT) (described in Roberts, SJ: Novelty detection using extreme value statistics. IEE Proceedings onVision, Image & Signal Processing, 146(3): 124-129, 1999). In SVDD thesupport of the data distribution is estimated, whilst the EVT estimatesthe distribution of extreme values. For this particular application,large numbers of examples of genuine notes are available, so in thiscase it is possible to obtain reliable estimates of the target classdistribution. We therefore choose one-class classification methods thatcan estimate the density distribution explicitly in a preferredembodiment, although this is not essential. In a preferred embodiment weuse one-class classification methods based on the parametric D² test).

In a preferred embodiment, the statistical hypothesis tests used for ourone-class classifier are detailed as follows:

Consider N independent and identically distributed p-dimensional vectorsamples (the feature set for each banknote) x₁, . . . , x_(N)εC with anunderlying density function with parameters θ given as p(x|θ). Thefollowing hypothesis test is given for a new point x_(N+1) such thatH₀:x_(N+1)εC vs. H₁:x_(N+1)∉C, where C denotes the region where the nullhypothesis is true and is defined by p(x|θ). Assuming that thedistribution under the alternate hypothesis is uniform then the standardlog-likelihood ratio for the null and alternate hypothesis$\begin{matrix}{\lambda = {\frac{\sup\limits_{\theta \in \Theta}{L_{0}(\theta)}}{\sup\limits_{\theta \in \Theta}{L_{1}(\theta)}} = \frac{\sup\limits_{\theta}{\prod\limits_{n = 1}^{N + 1}{p( x_{n} \middle| \theta )}}}{\sup\limits_{\theta}{\prod\limits_{n = 1}^{N}( x_{n} \middle| \theta )}}}} & (1)\end{matrix}$can be employed as a test statistic for the null-hypothesis. In thispreferred embodiment we can use the log-likelihood ratio as teststatistic for the validation of a newly presented note.

Feature vectors with multivariate Gaussian density: Under the assumptionthat the feature vectors describing individual points in a sample aremultivariate Gaussian, a test that emerges from the above likelihoodratio (1), to assess whether each point in a sample shares a common meanis described in (Morrison, D F: Multivariate Statistical Methods (thirdedition). McGraw-Hill Publishing Company, New York, 1990). Consider Nindependent and identically distributed p-dimensional vector samples x₁,. . . , x_(N) from a multivariate normal distribution with mean μ andcovariance C, whose sample estimates are {circumflex over (μ)}_(N) andĈ_(N). From the sample consider a random selection denoted as x₀, theassociated squared Mahalanobis distanceD ²=(x ₀−{circumflex over (μ)}_(N))^(T) Ĉ _(N) ⁻¹(x ₀−{circumflex over(μ)}_(N))  (2)can be shown to be distributed as a central F-distribution with p andN−p−1 degrees of freedom by $\begin{matrix}{F = {\frac{( {N - p - 1} ){ND}^{2}}{{p( {N - 1} )}^{2} - {NpD}^{2}}.}} & (3)\end{matrix}$

Then, the null hypothesis of a common population mean vector x₀ and theremaining x_(i) will be rejected ifF>F_(α;p,N−1),  (4)where F_(α;p,N−p−1) is the upper α·100% point of the F-distribution with(p,N−p−1) degrees of freedom.

Now suppose that x₀ was chosen as the observation vector with themaximum D² statistic. The distribution of the maximum D² from a randomsample of size N is complicated. However a conservative approximation tothe 100α percent upper critical value can be obtained by the Bonferroniinequality. Therefore we might conclude that x₀ is an outlier if$\begin{matrix}{F > {F_{{\frac{\alpha}{N};p},{N - p - 1}}.}} & (5)\end{matrix}$

In practice, either equations (4) or (5) can be used for outlierdetection.

We can make use of the following incremental estimates of the mean andcovariance in devising a test for new examples which do not form part ofthe original sample when an additional datum x_(N+1) is made available,i.e. the mean $\begin{matrix}{{\hat{\mu}}_{N + 1} = {\frac{1}{N + 1}\{ {{N\quad{\hat{\mu}}_{N}} + x_{N + 1}} \}}} & (6)\end{matrix}$and the covariance $\begin{matrix}{{\hat{C}}_{N + 1} = {{\frac{N}{N + 1}{\hat{C}}_{N}} + {\frac{N}{( {N + 1} )^{2}}( {x_{N + 1} - {\hat{\mu}}_{N}} ){( {x_{N + 1} - {\hat{\mu}}_{N}} )^{T}.}}}} & (7)\end{matrix}$

By using the expression of (6), (7) and the matrix inversion lemma,Equation (2) for an N-sample reference set and an N+1′th test pointbecomesD² =σ_(N+1) ^(T)Ĉ_(N+1) ³¹ ¹σ_(N+1), (8)where $\begin{matrix}{{\sigma_{N + 1} = {( {x_{N + 1} - {\hat{\mu}}_{N + 1}} ) = {\frac{N}{N + 1}( {x_{N + 1} - {\hat{\mu}}_{N}} )}}},{and}} & (9) \\{{\hat{C}}_{N + 1}^{- 1} = {\frac{N + 1}{N}{( {{\hat{C}}_{N}^{- 1} - \frac{{{\hat{C}}_{N}^{- 1}( {x_{N + 1} - {\hat{\mu}}_{N}} )}( {x_{N + 1} - {\hat{\mu}}_{N}} )^{T}{\hat{C}}_{N}^{- 1}}{N + 1 + {( {x_{N + 1} - {\hat{\mu}}_{N}} )^{T}{{\hat{C}}_{N}^{- 1}( {x_{N + 1} - {\hat{\mu}}_{N}} )}}}} ).}}} & (10)\end{matrix}$

Denoting (x_(N+1)−{circumflex over (μ)}_(N))^(TĈ) _(N)⁻¹(x_(N+1)−{circumflex over (μ)}_(N)) by D_(N+1,N) ², then$\begin{matrix}{D^{2} = {\frac{{ND}_{{N + 1},N}^{2}}{N + 1 + D_{{N + 1},N}^{2}}.}} & (11)\end{matrix}$

So a new point X_(N+1) can be tested against an estimated and assumednormal distribution for a common estimated mean {circumflex over(μ)}_(N) and covariance Ĉ_(N). Though the assumption of multivariateGaussian feature vectors often does not hold in practice, it has beenfound as an appropriate pragmatic choice for many applications. We relaxthis assumption and consider arbitrary densities in the followingsection.

2) Feature Vectors with arbitrary Density: A probability densityestimate {circumflex over (p)}(x; θ) can be obtained from the finitedata sample S={x₁, . . . , x_(N)}ε

^(d) drawn from an arbitrary density p(x), by using any suitablesemi-parametric (e.g. Gaussian Mixture Model) or non-parametric (e.g.Parzen window method) density estimation methods as known in the art.This density can then be employed in computing the log-likelihood ratio(1). Unlike the case of the multivariate Gaussian distribution there isno analytic distribution for the test statistic (λ) under the nullhypothesis. So to obtain this distribution, numerical bootstrap methodscan be employed to obtain the otherwise non-analytic null distributionunder the estimated density and so the various critical values ofλ_(crit) can be established from the empirical distribution obtained. Itcan be shown that in the limit as N→∞, the likelihood ratio can beestimated by the following $\begin{matrix}{\lambda =  \frac{\sup\limits_{\theta \in \Theta}{L_{0}(\theta)}}{\sup\limits_{\theta \in \Theta}{L_{1}(\theta)}}arrow{\hat{p}( {x_{N + 1};{\hat{\theta}}_{N}} )} } & (12)\end{matrix}$where {circumflex over (p)}(x_(N+1); {circumflex over (θ)}_(N)) denotesthe probability density of x_(N+1) under the model estimated by theoriginal N samples.

After generating B sets bootstrap of N samples from the reference dataset and using each of these to estimate the parameters of the densitydistribution {circumflex over (θ)}_(N) ^(i), B bootstrap replicates ofthe test statistic λ_(crit) ^(i), i=1, . . . , B can be obtained byrandomly selecting an N+1'th sample and computing {circumflex over(p)}(x_(N+1); {circumflex over (θ)}_(N) ^(i))≈λ_(crit) ^(i). By orderingλ_(crit) ^(i) in ascending order, the critical value α can be defined toreject the null-hypothesis at the desired significance level if λ≦λ_(α),where λ_(α) is the jth smallest value of λ_(crit) ^(i), and α=j/(B+1).

Preferably the method of forming the classifier is repeated fordifferent numbers of segments and tested using images of banknotes knownto be either counterfeit or not. The number of segments giving the bestperformance is then selected and the classifier using that number ofsegments used. We found that the best number of segments to be fromabout 2 to 15 although any suitable number of segments can be used.

described above, in a group of embodiments, a one-class classifier isused. This type of classifier can be thought of as defining a boundaryaround a known class such that examples falling outside that boundaryare deemed not to belong to the known class. However, a one-classclassifier typically classifies items into only two classes. This isproblematic in situations where it is required to classify banknotes aseither counterfeit, genuine, or suspect for example. We propose a methodof addressing this by varying a significance level or confidence levelused by a one-class classifier.

FIG. 4 is a schematic diagram showing the influence of differentsignificance levels on a one-class classifier. Suppose that a givenone-class classifier has a significance level of α1 indicated by theoval boundary 41 in FIG. 4. Banknotes are represented in FIG. 4 byeither dots or crosses depending on whether they are actually genuine oractually counterfeit. The majority of genuine banknotes in this examplefall within the boundary 41 and are classes as genuine by the one-classclassifier. Suppose that the significance level of the one classclassifier is now lowered to α2 indicated by the boundary 40 in FIG. 4.Now some counterfeit banknotes fall within the boundary 40 and so arewrongly classified as being genuine. We can also use the twosignificance levels to introduce a third classification. Those banknotesfalling between the boundary 40 and the boundary 41 may be classified assuspect. In this way, be introducing a plurality of differentsignificance levels for the one-class classifier we are able to increasethe number of classes into which classification is made.

Advantageously, it is not necessary to retrain the example one-classclassifier described in detail herein when the significance level ischanged.

FIG. 5 is a flow diagram of a method of validating a banknote using aone-class classifier having different significance levels. Twosignificance levels, one higher than the other, are pre-defined andstored (see box 50) for example, by manual configuration. Banknotevalidation is performed as described herein, using a one-classclassifier having the higher significance level (see box 51). If thebanknote is classified as genuine an output is made indicating this (seeboxes 52 and 53). If the banknote is classified as not genuine then thevalidation is repeated using the same one-class classifier but havingthe lower significance level (see box 54). If the banknote is classifiedas counterfeit an output is made to this effect (see boxes 55 and 57).However, if the banknote is classified as genuine then an indication ismade that it is “suspect” (see box 56). That is, the automatedvalidation process is repeated for the same banknote but with differentsignificance levels. If the results of the one-class classifier aredifferent for that banknote in each case then the banknote is classed as“suspect”. The one-class classifier is thought of as effectivelycarrying out a test on a statistical distribution of morphologicalcharacteristics of genuine notes. A boundary in this statisticaldistribution is, for example, defined by a significance level which setsa targeted false rejection rate of genuine notes.

In another embodiment, we enable classification of banknotes into morethan two classes by forming two or more segmentation maps (thesegmentation maps may or may not have the same number of segments). Eachsegmentation map is associated with a region of a banknote as nowdescribed in more detail with reference to FIG. 6. This results in aplurality of classifiers, one for each segmentation map, so that theclassifiers are each associated with a different region of a banknote.These classifiers are referred to herein as localized classifiers.

FIG. 6 is a schematic representation of a face of a banknote of aparticular denomination and currency. It is divided into three regions61, 62, 63 indicated by dotted lines in FIG. 6. Two or more regions areused and these are positioned, sized and arranged in any suitablemanner. In a preferred example, the regions are selected such that theyeach contain one or more security features 64 of the banknote, such asholograms, thread marks, and watermarks. However, this is not essential.The regions may be uniform and contiguous as indicated in FIG. 6although this is not essential. Advantageously, by selecting the regionssuch that they each contain one or more security features, we are ableto assess likelihood of one or more of those security features beingabsent. This assists in enabling classification of banknotes into aplurality of categories including, counterfeit, genuine and “suspect”.The regions may be selected in any suitable manner, such as by using animage processing or image recognition system to identify the securityfeatures. For example, infra-red or thermal imaging may be used to pickout appropriate security features such as watermarks. Also, tailoredillumination may be used to pick out holograms or other complexdiffraction grating security features. Alternatively, the regions may bemanually configured for different currencies and denominations inadvance.

FIG. 7 is a flow diagram of a method of using localized classifiers forbanknote validation. A banknote to be validated is input to thevalidator (see box 70) and images of the banknote captured (see box 71).The images are divided into R specified regions (see box 72). Those Rregions are the same regions as already used to form segmentation mapsand corresponding classifiers. Each region of the image is thensegmented using the segmentation map for that region (see box 73) andinformation is extracted from each segment of each region. Thisinformation is input to the appropriate R classifiers (see box 75). Ifall the classifiers indicate a pass, i.e. that the banknote is genuinethen it is indicated as genuine (see box 76). If all the classifiersindicate a fail then the banknote is indicated as counterfeit (see box77). Otherwise the banknote is indicated as suspect (see box 78).

It is also possible to combine one or more of the methods describedherein for classifying banknotes into two or more categories.

mentioned above, one method involves using a plurality of classifiers,each classifier being associated with one segment of a segmentation map.This is now referred to as method A.

Another method involves using a single classifier but with a pluralityof significance levels. This is now referred to as method B.

Another method involves using a plurality of localized classifiers, eachassociated with a different region of a banknote image. This is nowreferred to as method C.

Possible combinations of these methods comprise (but are in no waylimited to):

-   A and then B-   C and then B (as illustrated in FIG. 8)-   C and then A-   C and then A and then B.

FIG. 8 is a flow diagram of an example of combining method C and thenmethod B. Method C steps are indicated in FIG. 8 by boxes 82, 83 and 84and method B steps are indicated by boxes 85, 86, 87, 88 and 89. Thebanknote to be tested is input (box 80), images are captured (box 81),and the images partitioned into S regions (82). S localized segmentationmaps are then created using the methods described herein (box 83) andinformation is extracted from the S regions using the appropriatesegmentation maps (box 84). The classifier test is run, for all Sclassifiers, using a higher significance level (box 85). If allclassifiers indicate a genuine note a genuine note is indicated (see box87). Otherwise the classifiers repeat the tests using a lowersignificance level. If all classifiers indicate a genuine note, asuspect note is indicated (box 88). Otherwise a counterfeit note isindicated (box 89). In this way we are able to provide an extraconfidence for customers. It is not unusual for a genuine note to becomeworn and torn after a certain length of circulation. Such a note is verylikely to be categorized as counterfeit by all S localized classifiersif using a tight (high) significance level. This may result in afinancial loss for the customer. Therefore, by testing again using alooser (lower) significance level, this note may be recognized asgenuine by all S classifiers, and thus can be categorized as suspect forfurther investigation. This avoids the customer's loss. Meanwhile sincereal counterfeits will not be affected and will still be recognized, thesecurity of the self service apparatus or other component using theprocess is still kept. The method also provides flexibility for banks tocustomize their tightness and standardize what quality of notes will beput into the suspect category. This is achieved because both S and thesignificance levels are adjustable.

FIG. 9 is a flow diagram of an example of combining method A and thenmethod B. Method A steps are indicated by boxes 92 to 93 and method Bsteps are indicated by boxes 94 through 98. Steps 90 and 91 correspondto steps 80 and 81 of FIG. 8.

FIG. 10 is a flow diagram of an example of combining method C and then Aand then B. Method C steps are indicated by boxes 100 and 101. Method Astep is 102. In this case, many classifiers are used, one for eachbanknote region S and segment of each banknote region K. The tests arecarried out at the two significance levels (see boxes 103 through 107)using each of the S×K classifiers.

An advantage of the banknote validation methods using a plurality ofclasses (e.g. counterfeit, genuine, suspect) is that they can increaseconsumer trust, appreciation and confidence in the automated banknotevalidator. If a note is classed as suspect it may be accepted andcredited to a customer account in the short term, whilst manual or otheroff-line investigations are made about the validity of the note.

FIG. 11 is a schematic diagram of an apparatus 110 for creating aclassifier 112 for banknote validation. It comprises:

-   an input 111 arranged to access a training set of banknote images;-   a processor 113 arranged to create a segmentation map using the    training set images;-   a segmentor 114 arranged to segmenting each of the training set    images using the segmentation map;-   a feature extractor 115 arranged to extract one or more features    from each segment in each of the training set images; and-   classification forming means 116 arranged to form the classifier    using the feature information;    wherein the processor is arranged to create the segmentation map on    the basis of information from all images in the training set. For    example, by using spatio-temporal image decomposition described    above.

FIG. 12 is a schematic diagram of a banknote validator 121. Itcomprises:

-   an input arranged to receive at least one image 120 of a banknote to    be validated;-   a segmentation map 122;-   a processor 123 arranged to segment the image of the banknote using    the segmentation map;-   a feature extractor 124 arranged to extract one or more features    from each segment of the banknote image;-   a classifier 125 arranged to classify the banknote as being either    valid or not on the basis of the extracted features;    wherein the segmentation map is formed on the basis of information    about each of a set of training images of banknotes. It is noted    that it is not essential for the components of FIG. 12 to be    independent of one another, these may be integral.

FIG. 13 is a flow diagram of a method of validating a banknote. Themethod comprises:

-   accessing at least one image of a banknote to be validated (box    130);-   accessing a segmentation map (box 131);-   segmenting the image of the banknote using the segmentation map 9    box 132);-   extracting features from each segment of the banknote image (box    133);-   classifying the banknote as being either valid or not on the basis    of the extracted features using a classifier (box 134);    wherein the segmentation map is formed on the basis of information    about each of a set of training images of banknotes. These method    steps can be carried out in any suitable order or in combination as    is known in the art. The segmentation map can be said to implicitly    comprise information about each of the images in the training set    because it has been formed on the basis of that information.    However, the explicit information in the segmentation map can be a    simple file with a list of pixel addresses to be included in each    segment.

FIG. 14 is a schematic diagram of a self-service apparatus 141 with abanknote validator 143. It comprises:

-   a means for accepting banknotes 140,-   imaging means for obtaining digital images of the banknotes 142; and-   a banknote validator 143 as described above.

The methods described herein are performed on images or otherrepresentations of banknotes, those images/representations being of anysuitable type. For example, images on any of a red, blue and greenchannel or other images as mentioned above.

The segmentation may be formed on the basis of the images of only onetype, say the red channel. Alternatively, the segmentation map may beformed on the basis of the images of all types, say the red, blue andgreen channel. It is also possible to form a plurality of segmentationmaps, one for each type of image or combination of image types. Forexample, there may be three segmentation maps one for the red channelimages, one for the blue channel images and one for the green channelimages. In that case, during validation of an individual note, theappropriate segmentation map/classifier is used depending on the type ofimage selected. Thus each of the methods described above may be modifiedby using images of different types and corresponding segmentationmaps/classifiers.

The means for accepting banknotes is of any suitable type as known inthe art as is the imaging means. Any feature selection algorithm knownin the art may be used to select one or more types of feature to use inthe step of extracting features. Also, the classifier can be formed onthe basis of specified information about a particular denomination orcurrency of banknotes in addition to the feature information discussedherein. For example, information about particularly data rich regions interms of color or other information, spatial frequency or shapes in agiven currency and denomination.

Any range or device value given herein may be extended or alteredwithout losing the effect sought, as will be apparent to the skilledperson.

It will be understood that the above description of a preferredembodiment is given by way of example only and that variousmodifications may be made by those skilled in the art.

1. A media validator comprising: (i) an input arranged to receive atleast one image of a media item to be validated; (ii) a segmentation mapcomprising information about relationships of corresponding imageelements between all images in a set of training images of media items;(iii) a processor arranged to segment the image of the media item usingthe segmentation map; (iv) a feature extractor arranged to extract oneor more features from each segment of the image of the media item; and(v) one or more classifiers together arranged to classify the banknoteinto one of at least three classes on the basis of the extractedfeatures.
 2. A media validator as claimed in claim 1 comprising only oneclassifier, that classifier being arranged to operate at each of aplurality of pre-specified confidence levels.
 3. A media validator asclaimed in claim 1 comprising a plurality of classifiers each formedfrom feature information extracted from different ones of the segments.4. A media validator as claimed in claim 1 comprising means for dividingthe image of the media item to be validated into a plurality of regionsand further comprising a plurality of segmentation maps, eachsegmentation map associated with a different one of the regions.
 5. Amedia validator as claimed in claim 4 comprising a plurality ofclassifiers, each classifier being associated with a different one ofthe segmentation maps.
 6. A media validator as claimed in claim 3wherein each of the classifiers is further arranged to operate at eachof a plurality of pre-specified confidence levels.
 7. A media validatoras claimed in claim 5 wherein each of the classifiers is furtherarranged to operate at each of a plurality of pre-specified confidencelevels.
 8. A media validator as claimed in claim 4 comprising aplurality of classifiers, each classifier being associated with adifferent one of the segmentation maps and a different segment of thatsegmentation map.
 9. A media validator as claimed in claim 8 whereineach of the classifiers is further arranged to operate at each of aplurality of pre-specified confidence levels.
 10. A media validator asclaimed in claim 1 wherein the image of the media item is of aparticular type and which further comprises a plurality of segmentationmaps, each segmentation map being for a different type of media itemimage.
 11. A media validator as claimed in claim 1 wherein theclassifier is a one-class classifier.
 12. A media validator as claimedin claim 1 comprising means for combining results from a plurality ofclassifiers.
 13. A method of validating a media item comprising: (i)accessing at least one image of a media item to be validated; (ii)accessing a segmentation map comprising information about relationshipsof corresponding image elements between all images in a set of trainingimages of media items; (iii) segmenting the image of the media itemusing the segmentation map; (iv) extracting features from each segmentof the image of the media item; and (v) classifying the media item intoone of at least three classes on the basis of the extracted featuresusing one or more classifiers together.
 14. A method as claimed in claim13 which comprises classifying the media item using only one classifier,that classifier being arranged to operate at each of a plurality ofpre-specified confidence levels.
 15. A method as claimed in claim 13which comprises classifying the media item using a plurality ofclassifiers each comprising feature information extracted from differentones of the segments.
 16. A method as claimed in claim 13 which furthercomprises dividing the image of the media item into a plurality ofregions and accessing a plurality of segmentation maps, eachsegmentation map associated with a different one of the regions.
 17. Amethod as claimed in claim 16 which further comprises classifying themedia item using a plurality of classifiers, each classifier beingassociated with a different one of the segmentation maps.
 18. A methodas claimed in claim 15 which further comprises operating each of theclassifiers at a plurality of pre-specified confidence levels.
 19. Amethod as claimed in claim 17 which further comprises operating each ofthe classifiers at a plurality of pre-specified confidence levels.
 20. Amethod as claimed in claim 16 which further comprises classifying themedia item using a plurality of classifiers, each classifier beingassociated with a different one of the segmentation maps and a differentsegment of that segmentation map.
 21. A method as claimed in claim 20which further comprises operating each of the classifiers at a pluralityof pre-specified confidence levels.
 22. A method as claimed in claim 13wherein the image of the media item is of a particular type and whichcomprises accessing a plurality of segmentation maps, each segmentationmap being for a different type of media item image.
 23. A method asclaimed in claim 13 comprising combining results from a plurality ofclassifiers.
 24. A computer program comprising computer program codemeans adapted to perform all the steps of a method of validating abanknote comprising: (i) accessing at least one image of a banknote tobe validated; (ii) accessing a segmentation map comprising informationabout relationships of corresponding image elements between all imagesin a set of training images of banknotes; (iii) segmenting the image ofthe banknote using the segmentation map; (iv) extracting features fromeach segment of the banknote image; and (v) classifying the banknoteinto one of at least three classes on the basis of the extractedfeatures using one or more classifiers together, when said program isrun on a computer.
 25. A computer program as claimed in claim 24embodied on a computer readable medium.
 26. A self-service apparatuscomprising: (i) a means for accepting media items, (ii) imaging meansfor obtaining digital images of the media items; and (iii) a mediavalidator comprising: (i) an input arranged to receive at least oneimage of a media item to be validated; (ii) a segmentation mapcomprising information about relationships of corresponding imageelements between all images in a set of training images of media items;(iii) a processor arranged to segment the image of the media item usingthe segmentation map; (iv) a feature extractor arranged to extract oneor more features from each segment of the media item image; and (v) oneor more classifiers together arranged to classify the media item intoone of at least three classes on the basis of the extracted features.